package com.ccys.db.mapper;

import com.ccys.db.dto.userManagement.TblMemberDeliveryAddressDTO;
import com.ccys.db.entity.TblMemberDeliveryAddress;
import com.ccys.db.vo.doctor.doctorConsultStage.GetDefaultAddressOfPatientVo;
import com.ccys.db.vo.userManagement.TblMemberDeliveryAddressWebVO;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

import java.util.List;

/**
 * Created by Mybatis Generator on 2023/12/18
 */
public interface TblMemberDeliveryAddressMapper extends Mapper<TblMemberDeliveryAddress>, MySqlMapper<TblMemberDeliveryAddress> {
    /**
     * @description 查询病人快递地址
     * @date 2023/12/21
     * @author cloud fly
     */
    List<TblMemberDeliveryAddressWebVO> listObjectsCms(TblMemberDeliveryAddressDTO dto);

    /**
     * 将当前用户不等于当前传入的地址id并且为删除的地址数据全部设置为0-不是默认地址
     *
     * @param addressId 传入的地址 - 修改条件为不等于这个地址ID
     * @param memberId  用户ID
     */
    void updateDefaultByAddressAndByMemberId(@Param("addressId") String addressId, @Param("memberId") String memberId);

    GetDefaultAddressOfPatientVo getDefaultAddressOfPatient(@Param("memberId") String memberId);
}